<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>

<!-- 引入基础的css和js -->
<link rel="import" href="../public/import.html" id="import"/>

</head>
<body>
<div id="app" v-cloak class="content-div">
    <!-- 列表显示区间 start -->
	<div v-show="showList">
	     <!-- 查询块 start -->
	     <div >
		   	 <div class="panel panel-default">
		        <div >
		            <form id="formSearch" class="form-horizontal">
		                <div class="form-group" >
		                    <div class="col-sm-3">
								<div class="input-group">
								    <div class="input-group-btn">
								        <button  class="btn btn-white" type="button">{{sysUserField.username}}</button>
								    </div>
								    <input type="text" class="form-control" v-model="search.username"
								    onkeyup="this.value=this.value.trim()"/>
							     </div>
					        </div>
					        <div class="col-sm-3">
								<button type="button" style="margin-left:10px" id="btn_query" class="btn btn-primary" v-on:click="query">{{pageData.query}}</button>
                            </div>
		                </div>
		            </form>
		        </div>
		    </div>
	    </div>
	    <!-- 查询块 end -->   
	    <!-- 列表table显示 start -->
		<div class="grid-btn" id="toolbar">
			<a id="add" v-if="hasPermission('sysuser:save')" class="btn btn-primary" v-on:click="add"><i class="fa fa-plus"></i>&nbsp;{{pageData.add}}</a>
			<a id="update" v-if="hasPermission('sysuser:update')" class="btn btn-primary" v-on:click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;{{pageData.update}}</a>
			<a id="delete" v-if="hasPermission('sysuser:delete')" class="btn btn-primary" v-on:click="del"><i class="fa fa-trash-o"></i>&nbsp;{{pageData.delete}}</a>
			<a id="used" v-if="hasPermission('sysuser:used')" class="btn btn-primary" v-on:click="audit(8)"><i class="fa fa-check-circle"></i>&nbsp;{{pageData.startUsed}}</a>
			<a id="stopUsed" v-if="hasPermission('sysuser:stopUsed')" class="btn btn-primary" v-on:click="audit(9)"><i class="fa fa-minus-circle"></i>&nbsp;{{pageData.stopUsed}}</a>	
		</div>
	    <table id="table"></table>
	    <!-- 列表table显示end -->
	</div>
    <!-- 列表显示区间 end -->
    
    <!-- 编辑内容显示区间 start -->
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}} <a class="ml10" href="javascript:void(0)"  data-toggle="tooltip" v-on:click="reload"><i class="fa fa-arrow-left"></i></a></div>
		<form id="defaultForm" class="form-horizontal" enctype="multipart/form-data"  @submit.prevent="saveOrUpdate">
										
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysUserField.username}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="username" v-model="sysUser.username" :placeholder="sysUserField.username"/>
	                </div>
	         </div>
	    						
			<div class="form-group" v-show="!isDetail">
			     	<div class="col-sm-2 control-label">{{sysUserField.password}}</div>
			     	<div class="col-sm-3">
			        	<input style="display:none">
	              		<input type="password" class="input-small form-control" name="password" v-model="sysUser.password" :placeholder="sysUserField.password"/>
	                </div>
	         </div>
	         
	         <div  class="form-group" v-show="!isDetail">
			     	<div class="col-sm-2 control-label">{{sysUserField.confirmPassword}}</div>
			     	<div class="col-sm-3">
	              		<input type="password" class="input-small form-control" name="confirmPassword" v-model="sysUser.confirmPassword" :placeholder="sysUserField.confirmPassword"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysUserField.email}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="email" v-model="sysUser.email" :placeholder="sysUserField.email"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysUserField.mobile}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="mobile" v-model="sysUser.mobile" :placeholder="sysUserField.mobile"/>
	                </div>
	         </div>
	         
	         <div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysUserField.companyNo}} </div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" style="-webkit-box-shadow: 0 0 0px 0px white inset!important;" readonly name="companyName" v-model="sysUser.companyName" :placeholder="sysUserField.companyNo"/>
	              		<input type="hidden" class="input-small form-control" name="companyId" v-model="sysUser.companyNo"/>
	                </div>
	                <div id="assiotBtn" class="col-sm-2" style="text-align: left">
	              		<button type="button" class="btn btn-primary" @click="assiotCompany"  id="btn-query">{{pageData.assiot}} </button>
	                </div>
	         </div>	
	         
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysUserField.role}}</div>
			     	<div class="col-sm-3">
			     		<div class="checkboxitems" id="showGroups" style="overflow:auto;height:100px;border:1px solid #000000;">
			     			<label v-for="role in sysUser.roleList" class="checkbox-inline">
							  <input name="roleIdList" type="checkbox" :value="role.roleId" v-model="sysUser.roleIdList">{{role.roleName}}
							</label>
			     		</div>
	                </div>
	                <div class="col-sm-2" style="text-align: left">
	              		<button type="button" class="btn btn-primary" @click="assiotRole" >{{pageData.assiot}}</button>
	                </div>
	         </div> 
	    				
		     <div class="form-group">
				<div class="col-sm-4 control-label"></div> 
					<input id="validateBtn" type="button" class="btn btn-primary" v-on:click="saveOrUpdate"  :value="pageData.sure"/>&nbsp;&nbsp;
					<input type="button" class="btn btn-warning" v-on:click="reload" :value="pageData.return"/>
			 </div>		
		</form>
    </div>
	<!-- 编辑内容显示区间 end -->
	    
</div>

<script src="../sys/js/sysuser.js"></script>
</body>
</html>